Closed Bug 1549532 Opened 6 years ago Closed 1 years ago

[meta] Runtime.executionContextsCleared

Categories

(Remote Protocol :: CDP, task)

task

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: ato, Unassigned)

References

()

Details

(Keywords: meta, Whiteboard: [event=Runtime.executionContextsCleared])

No description provided.
Keywords: meta
Whiteboard: [event=Runtime.executionContextsCleared]

By its name it should only be run at the very end of a test job when the browser gets closed. As such CSSCoverage in Puppeteer is based on that. Missing to emit this event might not be a problem given that Gutenberg tests don't rely on it. So it's not a blocker for the alpha release.

This doesn't only run on the very end of a session, but at any time eg. when a single tab is open and due to a requested notification, all of its execution contexts are getting destroyed. Here an example for the default context, and the __puppeteer_utility_world__ context when navigating to a data URL:

  puppeteer:protocol ◀ RECV {"method":"Page.frameStartedLoading","params":{"frameId":"2DDAA7D3C54C543B6317572523DC8309"},"sessionId":"FFB942A223718B95690A99BCC5F40E46"} +0ms
  puppeteer:protocol ◀ RECV {"method":"Page.lifecycleEvent","params":{"frameId":"2DDAA7D3C54C543B6317572523DC8309","loaderId":"FACA5BCB34FCC918174ADD024ED9CEEC","name":"init","timestamp":172936.176758},"sessionId":"FFB942A223718B95690A99BCC5F40E46"} +0ms
  puppeteer:protocol ◀ RECV {"method":"Runtime.executionContextDestroyed","params":{"executionContextId":1},"sessionId":"FFB942A223718B95690A99BCC5F40E46"} +1ms
  puppeteer:protocol ◀ RECV {"method":"Runtime.executionContextDestroyed","params":{"executionContextId":2},"sessionId":"FFB942A223718B95690A99BCC5F40E46"} +0ms
  puppeteer:protocol ◀ RECV {"method":"Runtime.executionContextsCleared","params":{},"sessionId":"FFB942A223718B95690A99BCC5F40E46"} +0ms
  puppeteer:protocol ◀ RECV {"method":"Page.frameNavigated","params":{"frame":{"id":"2DDAA7D3C54C543B6317572523DC8309","loaderId":"FACA5BCB34FCC918174ADD024ED9CEEC","url":"data:text/html;charset=utf-8,%3C!doctype%20html%3E%0A%3Cmeta%20charset%3Dutf-8%3E%0A%0A%20%20%3Cp%3EHello%20World%3C%2Fp%3E%0A","securityOrigin":"://","mimeType":"text/html"}},"sessionId":"FFB942A223718B95690A99BCC5F40E46"} +0ms
  puppeteer:protocol ◀ RECV {"method":"Runtime.executionContextCreated","params":{"context":{"id":3,"origin":"://","name":"","auxData":{"isDefault":true,"type":"default","frameId":"2DDAA7D3C54C543B6317572523DC8309"}}},"sessionId":"FFB942A223718B95690A99BCC5F40E46"} +0ms
  puppeteer:protocol ◀ RECV {"method":"Runtime.executionContextCreated","params":{"context":{"id":4,"origin":"://","name":"__puppeteer_utility_world__","auxData":{"isDefault":false,"type":"isolated","frameId":"2DDAA7D3C54C543B6317572523DC8309"}}},"sessionId":"FFB942A223718B95690A99BCC5F40E46"} +0ms

Hey Maja, is this command fully implemented now? If yes can you please close this bug as fixed? Otherwise we should file follow-up bugs. Thanks.

Flags: needinfo?(mjzffr)
Status: NEW → RESOLVED
Closed: 5 years ago
Flags: needinfo?(mjzffr)
Resolution: --- → FIXED

There is one more thing to fix... Currently we always emit the Runtime.executionContextsCleared event even with the Runtime domain disabled. I will get this fixed with my patches on bug 1593226.

Depends on: 1593226
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
No longer depends on: 1593226
Component: CDP: Runtime → CDP
Severity: normal → S3

Everything that we were able to do for this API is done.

Status: REOPENED → RESOLVED
Closed: 5 years ago1 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.